package com.hzyc.springdata.jpa.service;

import java.util.List;

import org.springframework.data.domain.Page;

import com.hzyc.springdata.jpa.domain.User;

public interface IUserService {

	public boolean addUser(User user);

	public User get(long id);

	public Page<User> getByPage(int page, int size);

	public List<User> findByUserNameAndPassword(String userName, String password);

	public List<User> findByRoleOrderByIdDesc(String role);

	public Long countByUserName(String name);
	
	public Page<User> findByRole(String role,int page,int size);
	
	public List<User> findByRole(String role);
	
	public List<User> queryUser(String userName);
	
	public User login(String userName, String password);
	
	public int setUserNameById(String userName, int id);
}
